#include <stdio.h>
int fas(int x)
{
	int m = 1;
	for (int i = 1; i <= x; i++)
	{
		m *= i;
	}
	return m;
}
int main()
{
	int n;
	n = fas(1) + fas(2) + fas(3) + fas(4) + fas(5) + fas(6) + fas(7) + fas(8) + fas(9) + fas(10) +
		fas(11) + fas(12) + fas(13) + fas(14) + fas(15) + fas(16) + fas(17) + fas(18) + fas(19) + fas(20);
	printf("%d", n);
	return 0;
}